package com.cardone.platform.usercenter.controller;

import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cardone.platform.usercenter.service.UsercenterService;

/**
 * 用户中心
 * 
 * @author yaoht
 */
@Setter
@Slf4j
@RequestMapping(UsercenterController.Paths.ROOT)
@Controller
public class UsercenterController {
	/**
	 * models集合
	 * 
	 * @author yaoht
	 * 
	 */
	public enum models {
		/**
		 * 消息
		 */
		message;
	}

	/**
	 * 路径集合
	 * 
	 * @author yaoht
	 * 
	 */
	public enum Paths {
		/**
		 * 用户中心主界面
		 */
		index;

		/**
		 * 用户中心视图根目录
		 */
		public static final String ROOT = "/platform/usercenter/usercenter/";

		/**
		 * 路径
		 */
		private final String path;

		/**
		 * 构建
		 * 
		 */
		private Paths() {
			this.path = Paths.ROOT + this.name();
		}

		/**
		 * 构建
		 * 
		 * @param path
		 *            路径
		 */
		private Paths(final String path) {
			this.path = Paths.ROOT + path;
		}

		/**
		 * 获取
		 * 
		 * @return 路径
		 */
		public String path() {
			return this.path;
		}
	}

	/**
	 * 用户中心服务
	 */
	@Qualifier(UsercenterService.BEAN_ID)
	@Autowired(required = false)
	private UsercenterService usercenterService;
}
